<template>
  <view class="tzgg">
    <view v-if="dataList.length && !loading">
      <ArticleList
        :articleList="dataList"
        url="/pagesA/tzgg/tzggDetail"
        keyName="noticeId" />
    </view>
    <view class="u-m-30" v-show="loading">
      <u-skeleton rows="5" title loading></u-skeleton>
    </view>
      <view class="empty-con">
		<u-empty mode="list" :show="!dataList.length&&!loading"></u-empty>
	  </view>
  </view>
</template>

<script setup>
import { ref } from "vue";
import ArticleList from "../../components/ArticleList.vue";
import { useList } from "@/hooks/useList";
import { onLoad } from "@dcloudio/uni-app";
import { getNoticeListApi } from "@/api/index";
import useInfoStore from "@/store/user";
const userStore  = useInfoStore()
const { loadData, dataList, page, loading } = useList({
  listApi: getNoticeListApi,
  otherParam:{ deptId: userStore.deptId }
});

onLoad(() => {
  page.value = 1;
  loadData({ deptId: userStore.deptId });
});
</script>

<style lang="scss" scoped></style>
